home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16133 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.6 KB  |  68 lines

  1. Newsgroups: comp.lang.smalltalk,comp.object,comp.lang.c++,comp.lang.java
  2. Path: alexandria.organon.com!alexandria!jsa
  3. From: jsa@organon.com (Jon S Anthony)
  4. Subject: Re: The Good, the Bad, the Ugly, and the Wicked ...
  5. In-Reply-To: mbk@caffeine.engr.utk.edu's message of 8 Apr 1996 19:40:42 GMT
  6. Message-ID: <JSA.96Apr9131057@organon.com>
  7. Followup-To: comp.lang.smalltalk,comp.object,comp.lang.c++,comp.lang.java
  8. Sender: news@organon.com (news)
  9. Organization: Organon Motives, Inc.
  10. References: <31570B8E.5A12@vmark.com> <4je5rq$7qg@mimas.brunel.ac.uk>
  11.     <4jes0t$gth@decaxp.HARVARD.EDU> <31630E30.5A02@oma.com>
  12.     <4kbq3q$1i8@gaia.ns.utk.edu>
  13. Date: Tue, 9 Apr 1996 17:10:57 GMT
  14.  
  15. In article <4kbq3q$1i8@gaia.ns.utk.edu> mbk@caffeine.engr.utk.edu (Matt Kennel) writes:
  16.  
  17. > Robert C. Martin (rmartin@oma.com) wrote:
  18. > : It is neither wrong nor right.  There are certainly some real-time systems
  19. > ...
  20. > : In any case, it matters little.  The more intense the real-time
  21. >...
  22. > : one merely trades the job of managing memory, for the job of
  23. > : managing the collector.
  24. > It is not a trade, as nearly all garbage collection systems still
  25. > *allow* manual memory management.
  26.  
  27. Right.  And for many RT systems you _don't_ want any "dynamic" memory
  28. allocation (as you hint below) or at the least, any that is not
  29. completely under your control.
  30.  
  31.  
  32. > : Malloc and new can *always* be made to be deterministic.  That is
  33. > : one of the major attractions to manual memory management in 
  34. > : real time systems.  You can use malloc/free (new/delete) pairs which are
  35. > : 100% predictable.
  36. > Are they?  Have you gone through the all the possible orderings of
  37. > previous 'new' and 'malloc' so that you ***KNOW*** exactly
  38. > what the internal heap structures are so that subsequent calls to 
  39. > 'malloc' and 'new' and 'free' take a known amount of time?
  40.  
  41. Actually, it is even worse than you are suggesting as Malloc/new and
  42. free are not necessarily very predictable and can exhibit "bad" behavior
  43. depending on their use.
  44.  
  45. > Thus the distinction should not be "GC" vs "malloc" but really
  46. > "GC or malloc" vs "static fixed storage."
  47.  
  48. Well, this depends on what you mean.  If you have control over your
  49. allocation pool and its allocation/deallocation resources (for example
  50. user defined storage pools in Ada95), you can have "dynamic storage"
  51. which is not malloc, GC _or_ "fixed" storage.  Assuming, of course,
  52. that you don't count under "fixed" the need for the initial block of
  53. memory for your pool (which could be _static_ or not).
  54.  
  55. /Jon
  56. -- 
  57. Jon Anthony
  58. Organon Motives, Inc.
  59. 1 Williston Road, Suite 4
  60. Belmont, MA 02178
  61.  
  62. 617.484.3383
  63. jsa@organon.com
  64.  
  65.